import requests

# 模拟完整浏览器请求头（包含更多用户标识信息）
headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8",
    "Accept-Encoding": "gzip, deflate, br",
    "Accept-Language": "zh-CN,zh;q=0.9",
    "Connection": "keep-alive",
    "Upgrade-Insecure-Requests": "1"
}
url = "https://v5-hl-e-bd.douyinvod.com/2cda3d5a92ab5182148a86cfc15b8b7e/65cd1e99/video/tos/cn/tos-cn-ve-15c001-alinc2/o8QGgbn6nBqL8eJBeoDdtDQ7RCGIawfAt87lGA/?a=1128&ch=0&cr=0&dr=0&er=0&cd=0%7C0%7C0%7C0&cv=1&br=5110&bt=5110&cs=0&ds=4&ft=LcW-In998xIGuokPo0P5H4eaciDXtNpmQ_QEeQErpB~D1Inz&mime_type=video_mp4&qs=0&rc=ZGhmZWU8ZzZpNWdmZjQ6ZkBpM208ZWU6ZnFwcDMzNGkzM0AtMF4zMTJgXjYxNmMtYV42YSNwc2hfcjRnZWVgLS1kLTBzcw%3D%3D&btag=e00088000&dy_q=1707768716&feature_id=59cb2766d89ae6284516c6a254e9fb61&l=2024021304115682C8CBCA2399114A8914"
res = requests.get(url, headers=headers)
print(res.content)
# with open("美女2.jpg","wb") as f:
#     f.write(res.content)